#pragma once

#include <assert.h>
#include <stdio.h>

#define UT_CHECK(cond) \
{\
    if(!(cond)) \
    {\
        printf("[%s] faild\n", #cond);\
        assert(0); \
    }\
}

#define UT_CHECK_1(cond, action) \
{\
    if(!(cond)) \
    {\
        printf("[%s] faild\n", #cond);\
        assert(0); \
        action; \
    }\
}

#define UT_CHECK_INT_1(cond1, cond2, action) \
{\
    if((cond1) != (cond2)) \
    {\
        printf("[%d] [%d] not equal faild\n", cond1, cond2);\
        assert(0); \
        action; \
    }\
}

void TestEventLoopThreadStart();

void TestEventLoopThreadStop();

void TestEventLoopThreadFunc();

void TestTcpClinetStart();

void TestTcpClinetStop();

void TestTcpClinetSend();

void TestBuffer();